package com.catmiw.csdn;

import java.nio.charset.Charset;
import java.util.Properties;

public class ISO8859 {
	public static void main(String[] args){
		//System.setProperty("file.encoding","iso8859-1");
		
		String strChina="中国";
		for(int i=0;i<strChina.length();i++)
			System.out.println(Integer.toHexString(strChina.charAt(i)));
		byte[] buf=strChina.getBytes(Charset.forName("iso8859-1"));
		for(int i=0;i<buf.length;i++)
			System.out.println(Integer.toHexString(buf[i]));
		System.out.println(strChina);
		for (int i=0;i<buf.length;i++)
			System.out.write(buf[i]);
		System.out.println();
	}
}
